package com.zwps.biz.controller.http;

import com.github.pagehelper.PageInfo;
import com.zwps.biz.api.model.vo.pubwarnrec.PubWarnRecVO;
import com.zwps.biz.api.model.vo.pubwarnrec.ZScoreVO;
import com.zwps.biz.domain.service.PubWarnRecService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Validated
@RequestMapping("brief/rainfall")
public class PubWarnRecController {

    @Autowired
    private PubWarnRecService pubWarnRecService;

    @Tag(name = "工程概况")
    @GetMapping("drp_warning")
    @Operation(summary = "获取预警信息")
    public PageInfo<PubWarnRecVO> getRainfall( @RequestParam(defaultValue = "1") int pageNum,
                                               @RequestParam(defaultValue = "10") int pageSize) {
        return pubWarnRecService.getRainfall(pageNum,pageSize);
    }

    @Tag(name = "运行状态评价")
    @GetMapping("getStatusScore")
    @Operation(summary = "获取预警信息")
    public List<ZScoreVO> getStatusScore() {
        return pubWarnRecService.getStatusScore();
    }



}
